home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19960209-19960425 / 000163_news@columbia.edu _Wed Mar 6 13:53:21 1996.msg < prev    next >
Internet Message Format  |  2020-01-01  |  5KB

  1. Return-Path: news@columbia.edu
  2. Received: from apakabar.cc.columbia.edu (apakabar.cc.columbia.edu [128.59.35.159]) by watsun.cc.columbia.edu (8.7.3/8.7.3) with ESMTP id NAA28013 for <kermit.misc@watsun>; Wed, 6 Mar 1996 13:53:20 -0500 (EST)
  3. Received: (from news@localhost) by apakabar.cc.columbia.edu (8.7.3/8.7.3) id NAA22880 for kermit.misc@watsun; Wed, 6 Mar 1996 13:53:17 -0500 (EST)
  4. Path: news.columbia.edu!panix!imci5!pull-feed.internetmci.com!news.internetMCI.com!newsfeed.internetmci.com!news.mathworks.com!zombie.ncsc.mil!nntp.coast.net!oleane!calvacom!newsmaster
  5. From: do11@calvacom.fr (Dominique Ottello)
  6. Newsgroups: comp.protocols.kermit.misc
  7. Subject: Re: Auto Delete Files after sending in kermit
  8. Date: Wed, 06 Mar 1996 16:00:58 GMT
  9. Organization: CalvaCom Networks
  10. Lines: 117
  11. Message-ID: <313db59b.462468@news.calvacom.fr>
  12. References: <826038248.2742@skiving.demon.co.uk>
  13. Reply-To: do11@calvacom.fr
  14. NNTP-Posting-Host: par05.calvacom.fr
  15. X-Newsreader: Forte Agent .99d/16.182
  16.  
  17. Dave Cook <SKIVING.demon.co.uk> wrote:
  18.  
  19. >Probably an easy answer to this one but I cant find it, how do I get
  20. >Kermit to remove files as it sends them. If modem drops the connection 
  21. >when executing 'send *.snd' I dont know how many where sent, if any, and 
  22. >how many I need to resend. Unfortunately I have to turn the display off so 
  23. >cant watch the fancy screen of bytes transferred.
  24.  
  25. Better than my first explaination, here is the proc∩┐╜dure I use
  26.  
  27. ; Replacement for send *.xxx because in case of transfer failure
  28. ; it is impossible to know what file is in transfer error
  29. ; Of course, this procedure takes more time but gives informations
  30. ; about files not tranferred between the PC and the Host
  31. ; The result state of files transfer will be int the DOS file
  32. ; defined here after with variable Res_Send
  33. ;
  34. ;          -+- Definitions of user variables -+-
  35. ;           To be modified according your needs
  36. ;    Complete path where the file to send are (without ending \)
  37. define My_Path C:\MUSIC\SOUND\HOMESND
  38. ;    Mask of files to send
  39. define Mask *.SND
  40. ;    Complete path of file where to put the result of DIR
  41. define Res_Dir C:\KERMIT\DIRTXT.TXT
  42. ;    Complete path of file where to put the result of files transfer
  43. define Res_Send C:\KERMIT\RESSEND.TXT
  44. ;
  45. ; Suppression of result files   
  46. if exist \m(Res_Dir) run del \m(Res_Dir)
  47. if exist \m(Res_Send) run del \m(Res_Send)
  48. ;
  49. ; Reading list of files to send into a file
  50. run dir \m(My_Path)\{92}\m(Mask) /B > \m(Res_Dir)
  51. ;
  52. ; Hereafter your procedure to put the host into Kermit Server
  53. ;  mine is : output {TRANSFER\13K\13K\13}
  54. ;            input 60 {then reconnect}
  55. ;
  56. ; Do not show the transfer window (if you want)
  57. set file display quiet
  58. ;
  59. ; Definition of variables
  60. ; \%n      : number of files
  61. ; \%r      : number of retries for each file
  62. ; File_\%n : state of transfer (OK or Error) for each file
  63. define \%n 1
  64. define \%r 1
  65. open read \m(Res_Dir)
  66. ;
  67. :Read_Loop
  68. read File_To_Send
  69. if failure goto EOF
  70. assign File_To_Send \m(My_Path)\{92}\m(File_To_Send)
  71. ;
  72. :ReSend
  73. echo {\Frpad(\m(File_To_Send),40, ) Trial : \%r}
  74. send \m(File_To_Send)
  75. if failure goto Fail_Send
  76. ;
  77. _define File_Not_OK_\%n
  78. ; Deletion of file if correct send
  79. run del \m(File_To_Send)
  80. ;
  81. :Inc_Loop
  82. define \%r 1
  83. increment \%n
  84. goto Read_Loop
  85. ;
  86. :Fail_Send
  87. increment \%r
  88. ; Max of 5 send retries for each file
  89. if not > \%r 5 goto Resend
  90. ; Too more retries for this file
  91. _assign File_Not_OK_\%n \m(File_To_Send)
  92. goto Inc_Loop
  93. ;
  94. :EOF
  95. close read-file
  96. decrement \%n
  97. ; Hereafter your procedure to exit form host Kermit Server
  98. ;  mine is : finish
  99. ;            output Q\13
  100. ;            input =
  101. ;
  102. ; Testing of transfer state for each file
  103. echo
  104. if > \%n 0 goto Test_Send
  105. echo {There is no file \m(My_Path)\{92}\m(Mask) to send}
  106. run echo There is no file \m(My_Path)\{92}\m(Mask) to send >
  107. \m(Res_Send)
  108. echo
  109. goto End_Send
  110. ;
  111. :Test_Send
  112. define Send_Error No
  113. define \%a 1
  114. :State_Loop
  115. assign Foo if not defined File_Not_OK_\%a goto Inc_State
  116. do Foo
  117. define Send_Error Yes
  118. echo {Transfer error for file : \m(File_Not_OK_\%a)}
  119. run echo Transfer error for file : \m(File_Not_OK_\%a) >> \m(Res_Send)
  120. :Inc_State
  121. increment \%a
  122. if not > \%a \%n goto State_Loop
  123. if equal \m(Send_Error) Yes goto End_Send
  124. run echo No transfer error for \m(My_Path)\{92}\m(Mask) files >
  125. \m(Res_Send)
  126. :End_Send
  127. echo
  128.  
  129.  
  130.  
  131.             ======================================================
  132.             == Dominique == do11@calvacom.fr == Paris == France ==
  133.             ======================================================